home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 228_01 / draw.c < prev    next >
Text File  |  1987-07-29  |  2KB  |  62 lines

  1. /*
  2. HEADER:         CUGXXX;
  3. TITLE:          Multiple character print program;
  4. DATE:           3-20-86;
  5. DESCRIPTION:    Prints character in multiples up, down, right or left. 
  6. KEYWORDS:       Multiple character printing;
  7. FILENAME:       DRAW.C;
  8. WARNINGS:       None;
  9. AUTHORS:        Jim Nech;
  10. COMPILER:       DeSmet C;
  11. REFERENCES:     US-DISK 1308;
  12. ENDREF
  13. */
  14. /*****************************************************************************
  15. * These functions allow you to print a character multiple times up,down,right*
  16. * or left. I have made these functions available in the hope that some of you*
  17. * may find them of use.These functions work properly with the DeSmet C         *
  18. * compiler.Please send any comments or suggestions to:                       *
  19. *                       Jim Nech                                             *
  20. *                       10114 Torrington                                     *
  21. *                       Houston Tx, 77075                                    *
  22. *            (713)941-3100                                        *
  23. *                       HAL-PC Member                                        *
  24. *****************************************************************************/
  25. draw_down(r,c,t,v)
  26. {
  27. int i;
  28. for(i=0; i<t; i++)
  29. scr_rowcol(r,c),printf("%c",v),r++;
  30. }
  31. draw_up(r,c,t,v)
  32. {
  33. while(t>0)
  34. {
  35. t--;
  36. scr_rowcol(r,c);
  37. printf("%c",v);
  38. --r;
  39. }
  40. }
  41.  
  42.  
  43. draw_right(r,c,t,v)
  44. {
  45. int i;
  46. scr_rowcol(r,c);
  47. for(i=0; i<t; i++)
  48. printf("%c",v);
  49. }
  50.  
  51.  
  52. draw_left(r,c,t,v)
  53. {
  54. while(t>0)
  55. {
  56. t--;
  57. scr_rowcol(r,c);
  58. c--;
  59. printf("%c",v);
  60. }
  61. }
  62.